package com.zigong.app.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.ruihang.generalibrary.ui.adapter.BaseAbstractAdapter;
import com.ruihang.generalibrary.ui.adapter.BaseHolderAbsAdapter;
import com.ruihang.generalibrary.ui.adapter.BaseRecylerAdapter;
import com.ruihang.generalibrary.ui.util.OnItemInternalCheckChangedListener;
import com.ruihang.generalibrary.ui.util.OnItemInternalClick;
import com.zigong.app.R;
import com.zigong.app.ui.adapter.holder.AddColumnHolder;
import com.zigong.app.ui.datainf.IColumnData;
import com.zigong.app.ui.util.IListShowData;

import java.util.List;

/**
 * Created by Administrator on 2017/7/5 0005.
 */

public class AddCollumnAdapter<T extends IColumnData> extends BaseHolderAbsAdapter<T,AddColumnHolder<T>> {

    public AddCollumnAdapter(Context context, List<T> list) {
        super(context, list);
    }

    @Override
    public int getItemCount() {
        return super.getItemCount();
    }

    @Override
    public T getItem(int position) {
        return super.getItem(position);
    }

    @Override
    public AddColumnHolder<T> onCreateViewHolder(ViewGroup parent, int viewType) {
        View view= LayoutInflater.from(context).inflate(R.layout.item_add_column,parent,false);
        AddColumnHolder addColumnHolder=new AddColumnHolder(context,view);
        addColumnHolder.setInternalClick(this);
        addColumnHolder.setInternalCheckChangedListener(this);
        return addColumnHolder;
    }

    @Override
    public AddCollumnAdapter setItemInternalClick(OnItemInternalClick itemInternalClick) {
         super.setItemInternalClick(itemInternalClick);
        return this;
    }

    @Override
    public AddCollumnAdapter setItemInternalCheckChangedListener(OnItemInternalCheckChangedListener itemInternalCheckChangedListener) {
         super.setItemInternalCheckChangedListener(itemInternalCheckChangedListener);
        return this;
    }
}
